package com.yangquan;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.EnableCaching;

@SpringBootApplication
//开启缓存
@EnableCaching
@MapperScan(basePackages = {"com.yangquan.mapper"})
public class SpringCacheRedisApplication {

    public static void main(String[] args) {
        System.out.println("springCache整合redis: https://blog.csdn.net/zhang19903848257/article/details/115144049");
        System.out.println("springCache整合redis: https://blog.csdn.net/chachapaofan/article/details/88829265");
        System.out.println("纯使用springcache作为缓存,是将数据存放到jvm内存中。因此将redis配合使用,直接将数据同步到磁盘中,服务关闭开启后,保证数据不会丢失。" +
                "springcache使用注解的方式更加方便");
        System.out.println("http://localhost:8802/student/getStudentSalary");
        System.out.println("http://localhost:8802/student/updateStudent?id=3");
        System.out.println("启动项目需要启动redis");
        SpringApplication.run(SpringCacheRedisApplication.class, args);
    }

}
